<?php
declare(strict_types=1);

namespace App\Foundation\Facades;

use Hyperf\Utils\ApplicationContext;
use Hyperf\Redis\RedisFactory;

class Redis
{


    public static function __callStatic(string $method, $args = [])
    {
        return call_user_func([ApplicationContext::getContainer()->get(\Hyperf\Redis\Redis::class), $args]);
    }

    /**
     * @param string $name
     * @return \Hyperf\Redis\RedisProxy
     */
    public static function get($name = 'default')
    {
        return ApplicationContext::getContainer()->get(RedisFactory::class)->get($name);
    }


}
